@layout('layouts.clearly')

@section('head-zone')
<script type="text/javascript">
    $(function () {
        // active overlay
        $('.page-overlay').fadeIn(500);

        var $redirect = $('a#redirect', '#message');
        // Thực hiện chuyển trang
        if ($redirect.length > 0) {
            var $timer = $('#timer', '#message');
            jqExt.redirect($redirect.attr('href'), $timer);
        }
    });
</script>
@endsection

@section('content')
    <div id="message" class="clear-fix center {{ $type }}">
        <div class="header">

            <h2>{{ $title }}</h2>
        </div>
        <div class="content-outer">
            <div class="content">
                {{ $content }}
                <p class="describe">{{ $describe }}</p>
            </div>
        </div>
        <div class="footer clear-fix">
        @if ($confirm)
            <form action="{{ asset($confirm_submit_url) }}" class="confirm" method="POST">
                <div class="buttons">
                    {{ Form::token() }}
                    <button class="btn btn-primary" type="submit">{{ $confirm_submit_label }}</button>
                    <a class="btn" href="{{ asset($confirm_cancel_url) }}">{{ $confirm_cancel_label }}</a>
                </div>
            </form>
        @else
            <div class="footer-inner">
                @if ($redirect)
                <a href="{{ asset($redirect_url)}}" id="redirect">
                    {{ $redirect_msg }} sau <span id="timer">{{ $redirect_timeout }}</span> giây
                    <small>
                        <i class="icon-arrow-down"></i>
                        Click vào đây nếu không tự chuyển
                    </small>
                </a>
            @else
                <a href="{{ asset('/') }}">
                    <small>
                        <i class="icon-arrow-down"></i>
                        Đến trang chủ
                    </small>
                    Quay về trang chủ
                </a>
            @endif
            </div>
        @endif
        </div>
    </div>
@endsection